package xiaof.service.impl;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import xiaof.dao.UserDao;
import xiaof.dao.impl.UserDaoIml;
import xiaof.service.UserServive;

public class UserServiceImpl implements UserServive {

    private UserDao userDao;

    public UserServiceImpl(UserDao userDao) {
        this.userDao = userDao;
    }

    public UserServiceImpl() {
    }
    /* public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }*/

    @Override
    public void save() {
     /*   ApplicationContext app=new ClassPathXmlApplicationContext("applicationContext.xml");
        UserDao userDao1= (UserDao) app.getBean("userDao");*/
        userDao.save();
    }


}
